﻿<%
class ActionSession
	private sub Class_Initialize()
	end sub
	public sub index
		Mo.Assign "title","session演示"
		Mo.display "home:top"
		F.echo "<h3>Session读写：</h3>"
		F.session "Asp.ID","Sess-Anlige"
		F.session "AspID","Sess-Anlige1"
		F.session "AspName","Sess-AspName"
		F.each Session.Contents,GetRef("CallBack")
		
		F.echo "<h3>判断Session是否存在：</h3>"
		F.echo "Asp = " & F.session.Exists("Asp") & "<br />"
		F.echo "Asp.ID = " & F.session.Exists("Asp.ID") & "<br />"
		F.echo "AspID = " & F.session.Exists("AspID") & "<br />"
		F.echo "Asp.Namessdsdsd = " & F.session.Exists("Asp.Namessdsdsd") & "<br />"
		F.echo "AspName1 = " & F.session.Exists("AspName1") & "<br />"
		
		F.echo "<h3>删除Session(AspID)：</h3>"
		F.session.destroy "AspID"
		F.each Session.Contents,GetRef("CallBack")
		
		F.echo "<h3>删除Session(Asp)：</h3>"
		F.session.destroy("Asp")
		F.each Session.Contents,GetRef("CallBack")
		
		F.echo "<h3>销毁Session（注销会话，在新页面才能看到效果）：</h3>"
		F.session.destroy(true)
		F.each Session.Contents,GetRef("CallBack")
		
		F.echo "<h3>清除Session（仅移除所有项，本页面就可以看到效果）：</h3>"
		F.session.destroy()
		F.each Session.Contents,GetRef("CallBack")
		Mo.display "home:foot"
	end sub
	public sub index1
		Mo.display "home:top"
		F.each Session.Contents,GetRef("CallBack")
		Mo.display "home:foot"
	end sub
end class
function CallBack(q,src)
	F.echo q & " = " & src(q) & "<br />" & vbcrlf
end function
%>